package net.roobook.cms.modules.admin.controller;

import com.github.pagehelper.PageInfo;
import net.roobook.cms.common.annotation.Log;
import net.roobook.cms.common.annotation.Log.OperatorType;
import net.roobook.cms.common.entity.SearchEntity;
import net.roobook.cms.common.web.BaseController;
import net.roobook.cms.modules.admin.entity.SysLogger;
import net.roobook.cms.modules.admin.service.SysLoggerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author cos
 * @email 327878610@qq.com
 * @link https://roobook.net
 * @Description 系统日志controller
 * @date 2023/9/26 10:13
 **/
@Controller
@RequestMapping("/admin/log")
public class SysLoggerController extends BaseController {
    @Autowired
    private SysLoggerService sysLoggerService;
    @Log(operType = OperatorType.PAGE, module = "日志管理", content = "日志管理分页列表")
    @RequestMapping({"","/list"})
    public String taskList(Model model, SearchEntity params) {
        PageInfo<SysLogger> page = sysLoggerService.queryListByPage(params);
        model.addAttribute("page", page);
        return "admin/log/list";
    }
}
